<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of get_ref_vol</title>
  <meta name="keywords" content="get_ref_vol">
  <meta name="description" content="Returns the mat of the pattern's masked_by mask">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html . -->
<h1>get_ref_vol
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Returns the mat of the pattern's masked_by mask</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [vol] = get_ref_vol(subj,patname) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Returns the mat of the pattern's masked_by mask

 [VOL] = GET_REF_VOL(SUBJ,PATNAME)

 Think of this as getting the pattern's 'reference volume'.

 Every pattern needs to know which mask it's masked by, because the
 pattern throws away information about where its voxels/features come
 from. If you want to know which voxel is which, then you need to be
 able to refer back to a 3D volume reference space. That's what the
 masked_by field in all the patterns is for. This is a quick way of
 getting the reference space for a given pattern</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="get_mat.html" class="code" title="function [mat] = get_mat(subj,objtype,objname)">get_mat</a>	Returns the MAT field of the object</li><li><a href="get_objfield.html" class="code" title="function [val] = get_objfield(subj,objtype,objname,fieldname)">get_objfield</a>	Retrieves a field from an object</li></ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="get_masked_pattern.html" class="code" title="function [masked_pat] = get_masked_pattern(subj,patname,maskname)">get_masked_pattern</a>	Returns the pattern's voxels allowed by the mask</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [vol] = get_ref_vol(subj,patname)</a>
0002 
0003 <span class="comment">% Returns the mat of the pattern's masked_by mask</span>
0004 <span class="comment">%</span>
0005 <span class="comment">% [VOL] = GET_REF_VOL(SUBJ,PATNAME)</span>
0006 <span class="comment">%</span>
0007 <span class="comment">% Think of this as getting the pattern's 'reference volume'.</span>
0008 <span class="comment">%</span>
0009 <span class="comment">% Every pattern needs to know which mask it's masked by, because the</span>
0010 <span class="comment">% pattern throws away information about where its voxels/features come</span>
0011 <span class="comment">% from. If you want to know which voxel is which, then you need to be</span>
0012 <span class="comment">% able to refer back to a 3D volume reference space. That's what the</span>
0013 <span class="comment">% masked_by field in all the patterns is for. This is a quick way of</span>
0014 <span class="comment">% getting the reference space for a given pattern</span>
0015 
0016 
0017 masked_by = <a href="get_objfield.html" class="code" title="function [val] = get_objfield(subj,objtype,objname,fieldname)">get_objfield</a>(subj,<span class="string">'pattern'</span>,patname,<span class="string">'masked_by'</span>);
0018 
0019 <span class="keyword">if</span> isempty(masked_by)
0020   error(<span class="string">'Every pattern should know which mask it''s masked by, but this one doesn''t'</span>);
0021 <span class="keyword">end</span>
0022 
0023 vol = <a href="get_mat.html" class="code" title="function [mat] = get_mat(subj,objtype,objname)">get_mat</a>(subj,<span class="string">'mask'</span>,masked_by);</pre></div>
<hr><address>Generated on Wed 31-Aug-2005 15:27:57 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>